table.insert(itemActions,
	function(item, action)
		-- WHITE armors
		local priority = 7 -- pick priority

		if not isGoodWhiteArmor(item) then 
			return false
		elseif action == aPICK then
			return priority
		end

		return false
	end
)

minWhiteArmorED = 10 -- change this if you want
	--[[
		-1 will keep all normal and superior
		0 will keep only superior with 1+ed (it will not keep dura only superiors)
		1 will do the same (go figure)
		15 will keep only superior with 15ed
		etc.
		]]

function isGoodWhiteArmor(item)
	return (
			(
			item.baseItem.code == "xtp" or -- Mage Plate
			item.baseItem.code == "uld" or -- Kraken
            item.baseItem.code == "urs" or -- Hauberk
            item.baseItem.code == "uhn" or -- Boneweave
            item.baseItem.code == "ung" or -- Diamond
            item.baseItem.code == "ula" or -- Scarab
            item.baseItem.code == "uea" or -- Wyrm
			item.baseItem.code == "utu" or -- Wire Fleece
			item.baseItem.code == "utp" or -- Archon Plate
			item.baseItem.code == "uui" or -- Dusk Shroud
			item.baseItem.code == "uar" -- Sacred Armor
			)
			and
			(
			item.quality == ItemQuality.Normal or
			item.quality == ItemQuality.Superior
			) and
			not item.flags.Ethereal and
			findStat(item, "Defense Percent") >= minWhiteArmorED and
			hasCertainSockets(item, "034")
			)
end
